package com.immunology.service.impl;

import java.util.Collection;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.immunology.dao.PatientDao;
import com.immunology.domain.Patient;
import com.immunology.domain.Role;
import com.immunology.exception.DaoException;
import com.immunology.service.PatientService;

@Service
public class PatientServiceImpl implements PatientService{

	@Autowired
	private PatientDao patientDao;
	
	@Override
	public Patient findById(Long id) throws DaoException {
		return patientDao.findById(id);
	}

	@Override
	public List<Patient> getAll() throws DaoException {
		return patientDao.getAll();
	}

	@Override
	public void saveOrUpdate(Collection<Patient> entities) throws DaoException {
		patientDao.saveOrUpdate(entities);
	}

	@Override
	public void saveOrUpdate(Patient... entities) throws DaoException {
		patientDao.saveOrUpdate(entities);
	}

	@Override
	public void update(Collection<Patient> entities) throws DaoException {
		patientDao.update(entities);
	}

	@Override
	public void update(Patient... entities) throws DaoException {
		patientDao.update(entities);
	}

	@Override
	public void delete(Collection<Patient> entities) throws DaoException {
		patientDao.delete(entities);
	}
	
	@Override
	public void delete(Patient... entities) throws DaoException {
		patientDao.delete(entities);
	}

	@Override
	public void deleteAll() throws DaoException {
		patientDao.deleteAll();
	}

	@Override
	public void save(Collection<Patient> entities) throws DaoException {
		patientDao.save(entities);
	}

	@Override
	public void save(Patient... entities) throws DaoException {
		patientDao.save(entities);
	}


}
